﻿using ERAnimation;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace ERAnimation
{
    public class TestAnimationEvent : ERAnimationEvent
    {
        public enum TestAnimationEventEnum
        {
            野,
            兽,
            先,
            辈,
            suki,
        }
        public override List<ERAnimationArg> Args => new List<ERAnimationArg>()
    {
        new ERAnimationArg("Bool", typeof(bool), "false"),
        new ERAnimationArg("Int", typeof(int), "114514"),
        new ERAnimationArg("Float", typeof(float), "1919.810"),
        new ERAnimationArg("Vector2", typeof(Vector2), "(114, 514)"),
        new ERAnimationArg("Vector3", typeof(Vector3), "(19, 19, 810)"),
        new ERAnimationArg("Enum", typeof(TestAnimationEventEnum), "value1"),
        new ERAnimationArg("BoolList", typeof(List<bool>), ""),
        new ERAnimationArg("IntList", typeof(List<int>), ""),
        new ERAnimationArg("FloatList", typeof(List<float>), ""),
        new ERAnimationArg("Vector2List", typeof(List<Vector2>), ""),
        new ERAnimationArg("Vector3List", typeof(List<Vector3>), ""),
        new ERAnimationArg("EnumList", typeof(List<TestAnimationEventEnum>), ""),
        new ERAnimationArg("StringList", typeof(List<string>), ""),
        new ERAnimationArg("ListList", typeof(List<List<string>>), ""),
        new ERAnimationArg("Other", typeof(string), "哼，哼，哼，啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊"),
    };

        public override void OnEnter()
        {
            base.OnEnter();
            Debug.Log("Enter Event");
            /*
            Debug.Log(GetBool("Bool"));
            Debug.Log(GetInt("Int"));
            Debug.Log(GetFloat("Float"));
            Debug.Log(GetVector2("Vector2"));
            Debug.Log(GetVector3("Vector3"));
            Debug.Log(GetEnum<TestAnimationEventEnum>("Enum"));
            Debug.Log(GetBoolList("BoolList")[0]);
            Debug.Log(GetIntList("IntList")[0]);
            Debug.Log(GetFloatList("FloatList")[0]);
            Debug.Log(GetVector2List("Vector2List")[0]);
            Debug.Log(GetVector3List("Vector3List")[0]);
            Debug.Log(GetEnumList<TestAnimationEventEnum>("EnumList")[0]);
            Debug.Log(GetStringList("StringList")[0]);
            Debug.Log(GetStringListContent(GetStringList("ListList")[0])[0]);
            Debug.Log(GetArg("Other").value);*/
        }

        public override void Update()
        {
            base.Update();
        }

        public override void OnLeave()
        {
            base.OnLeave();
            Debug.Log("Leave Event");
        }
    }
}
